package com.xwh.week2;

public class Practice15 {
    public static void main(String[] args) {
        long path = method(21);
        System.out.println(path);
    }
    public static long method(int n){
        long[][] arrays=new long[n][n];
        for(int i=0;i<n;i++){
            arrays[i][0]=1;
        }
        for (int j = 0; j < n; j++) {
            arrays[0][j]=1;
        }
        for(int i=1;i<arrays.length;i++){
            for(int j=1;j<arrays[0].length;j++){
                arrays[i][j]=arrays[i-1][j]+arrays[i][j-1];
            }
        }
        return arrays[n-1][n-1];
    }
}
